import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';

/**
 * 身份证验证
 */
import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart';

import '../../../../res/colors.dart';
import '../../credit_inquiry/bean/custom_credit_entity.dart';
import '../../credit_inquiry/item/custom_credit_list_Item.dart';

class AppRoveMainPage extends StatefulWidget {
  @override
  _AppRoveMainPageState createState() => _AppRoveMainPageState();
}

class _AppRoveMainPageState extends State<AppRoveMainPage> {
  final List<Map<String, dynamic>> approvalItems = [
    {'text': '入职审批', 'image': 'assets/images/base/icon_base_edit.png'},
    {'text': '离职审批', 'image': 'assets/images/base/icon_base_edit.png'},
  ];


  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colours.base_primary_bg_page,
      appBar: BrnAppBar(
        title: '审批规则',
        backLeadCallback: () {
          BoostNavigator.instance.pop();
        },
      ),
      body: ListView.builder(
        itemCount: approvalItems.length,
        itemBuilder: (context, index) {
          return Container(
            color: Colors.white,
            padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(approvalItems[index]['text']),
                InkWell(
                  onTap: () {
                    BoostNavigator.instance.push("appEntryDepartMainPage", arguments: {"position": index});
                  },
                  child: Image.asset(
                    approvalItems[index]['image'],
                    width: 26,
                    height: 26,
                  ),
                ),
              ],
            ),
          );
        },
      ),
    );
  }
}
